/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package paket;

import java.awt.Panel;

/**
 *
 * @author mete
 */
class listenThread extends Thread {

    int sayac = 0;
    private BoardPanel panel;

    @Override
    public void run() {
        //preGame= postGame;
        try{
        new AePlayWave("test1.wav").start();
        }
        catch(Exception e){

        }
        while (true) {
            try{

              //  System.out.println("bekleniyor");
            panel.postGame = panel.connect.Readgame();
            //Hero.Yazdir(Hero.makeHero(panel.postGame));
            System.out.println("İlk gelen board değeri"+panel.postGame.team);
            panel.gameDraw();
            panel.tabloYaz();
            panel.getAplet().getjLabel1().setText("Sıra burada...");
            }
            catch(java.lang.NullPointerException ex){
                //panel.connect.Connection();
            }
            catch(Exception e){
                System.out.println(e);
            }
        }
    }

    public listenThread(BoardPanel panel) {
        this.panel = panel;
    }
}